<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{$web_name} 后台</title>
    <link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="__ADMIN__/css/main.css">

</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">{$web_name} 后台</div>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item nav-display">
                <a href="javascript:;" class="tpl-icon-rotate"><i title="隐藏/显示侧边栏" class="layui-icon layui-icon-shrink-right"> </i></a>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide-xs"><a href="">官网</a></li>
            <li class="layui-nav-item layui-hide-xs">
                <a href="javascript:;">消息<span class="layui-badge">9</span></a>
            </li>
            <li class="layui-nav-item layui-hide-xs"><a href="#" class="clearCached">清除缓存</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    无名氏<img src="__STATIC__/img/holder.jpg" class="layui-nav-img">
                </a>
                <dl class="layui-nav-child">
                    <dd class="layui-hide-sm layui-show-xs"><a href="#" class="clearCached">清除缓存</a></dd>
                    <dd class="layui-hide-sm layui-show-xs"><a href="#">消息提醒</a></dd>
                    <dd><a href="#">个人资料</a></dd>
                    <dd><a href="#">修改密码</a></dd>
                    <dd class="layui-hide-sm layui-show-xs"><a href="#">退出登录</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-hide-xs"><a href="#">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
            </ul>
        </div>
    </div>
    <div class="layui-body">
        <div class="layui-breadcrumb tpl-breadcrumb"  lay-separator=">">
            <a >当前位置</a>
        </div>
        <!-- 内容主体区域 -->
        <div class="layui-main">
            <div class="tpl-trailer">
                欢迎您。。。
            </div>
        </div>
    </div>
</div>
<div  id="bindModal" style="display: none;">
    <div class="layui-row" style="padding: 15px 10px;margin: 0 auto;text-align: center;">
        <div class="layui-col-md12">
            <form action="" class="layui-form" id="bindForm">
                <input type="hidden" name="type" value="1">
                <div class="layui-form-item">
                    <div class="layui-form-label">手机号：</div>
                    <div class="layui-input-inline">
                        <input type="text" name="keyword" class="layui-input" lay-verify="required" placeholder="手机号">
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="__STATIC__/js/jquery-3.2.1.min.js"></script>
<script src="__STATIC__/plugins/layui/layui.js"></script>

<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    $(function(){
        //如果被劫持，则刷新页面
        if ( typeof(_atn_obj_) != "undefined") {
            window.location.reload();
        }
        //实例化layui 的 tab元素
        layui.use('element');

        //弹窗绑定帐号
        layui.use('layer', function () {
            var modal = layer.open({
                type: 1
                , title: '填写手机号'
                , closeBtn: 0
                , btn: ['提交']
                , content: $('#bindModal').html()
                , yes: function (index, element) {
                    $.post('{:url("login/bindUser")}', $(element).find('form').serialize(), function (result) {
                        if (result.code) {
                            layer.msg('保存成功', {shade:[0.5,'#000'],time:1000}, function () {
                                window.location.href = result.url;
                            });
                        } else {
                            layer.alert(result.msg, {icon:2, title:'保存失败！'});
                        }
                    }, 'json');
                }
                , cancel: function(){
                    window.location.href = '{:url("login/bindUser")}';
                }
            });
        });
    });

</script>
</body>
</html>






